package com.example.bootdemo.service.impl;

import com.example.bootdemo.dao.UserMapper;
import com.example.bootdemo.model.User;
import com.example.bootdemo.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService implements IUserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> queryAll() {
        return userMapper.queryAll();
    }

    @Override
    public int add(User user) {
        return userMapper.add(user);
    }

    @Override
    public User queryById(Long id) {
        return userMapper.queryById(id);
    }
}
